<template>
	<view class="menu_card">
		<view class="card_item" v-for="(item,i) in list" :key="i" @click="goClassify(item.id,item.name)">
			{{item.name}}
		</view>
	</view>
</template>

<script>
	export default {
		name: "menuCard",
		props: {
			list: {
				type: Array,
				default: []
			}
		},
		data() {
			return {};
		},
		methods: {
			goClassify(id, title) {
				uni.navigateTo({
					url: `/classify/classify?id=${id}&title=${title}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.menu_card {
		display: flex;
		flex-wrap: wrap;
		padding: 10px 0;

		.card_item {
			width: 50%;
			font-size: 14px;
			text-align: center;
			line-height: 20px;
			margin: 10px 0;
		}
	}
</style>